package com.yf.springboot.springboot.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletResponse;

@Controller
public class ViewController {

    @GetMapping("/success")
    public String forwardSuccess(Model model, HttpServletResponse response) {
        System.out.println(response);

        model.addAttribute("title", "操作成功");
        model.addAttribute("msg", "点击下面链接");
        model.addAttribute("aText", "去百度");
        model.addAttribute("aLink", "https://www.baidu.com");
        return "success";
    }
}
